import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 邓大帅
 * Date: 2022-11-16
 * Time: 11:53
 */
public class Fibonacci {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        if (n == 1 || n == 2) {
            System.out.println(1);
        }
        int a = 1;
        int b = 1;
        int c = 1;
        for (int i = 2; i < n; i++) {
            c = a + b;
            a = b;
            b = c;
        }
        if (n > 2) {
            System.out.println(c);
        }
    }
}
